<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html lang="en">
<head>
	<title>录入货物信息</title>
	<meta charset="UTF-8">
	<script type="text/javascript" src="/Public/hdjs/jquery-1.11.3.min.js"></script>
    <link rel="stylesheet" href="/Public/hdjs/hdjs.css"/>
    <script type="text/javascript" src="/Public/hdjs/hdjs.min.js"></script>
	<link href="/Public/css/mine.css" type="text/css" rel="stylesheet" />
</head>
<body>
	<div class="div_head">
		<span>
			<span style="float: left;">当前位置是：仓库管理 >>录入货物信息</span>
		</span>
	</div>
	<div class="hd-w700" style="padding:20px;margin:0 auto">
    <form name="form1" method="post" action="/index.php/Goods/add">
      <table class="hd-table hd-table-form hd-form">
		<thead>
        <tr>
          <th colspan="2">录入货物信息</th>
        </tr>
		</thead>
        <tr>
          <td class="hd-w120 t_r">输入货物名称：</td>
          <td><input name="g_name" type="text" class="hd-w350"></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">选择货物单位：</td>
          <td><select name="g_dw_id" class="hd-w50">
          <?php if(is_array($dw)): $i = 0; $__LIST__ = $dw;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$d): $mod = ($i % 2 );++$i;?><option value="<?php echo ($d["dw_id"]); ?>"><?php echo ($d["dw_name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
          </select></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">输入库存预警数：</td>
          <td><input name="g_yjs" type="text" class="hd-w100" value="0" /></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">输入货物单个重量：</td>
          <td><input name="g_zl" type="text" class="hd-w100"></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">排序：</td>
          <td><input name="g_num" type="text" class="hd-w100"></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">输入货物备注信息：</td>
          <td><textarea name="g_bz" class="hd-w400 hd-h100"></textarea></td>
        </tr>
        <tr>
          <td class="hd-w120 t_r">货物负责人：</td>
          <td>【<?php echo (session('mg_name')); ?>】</td>
        </tr>
        <tr>
          <td colspan="2" align="center"><input type="submit" class="hd-btn hd-btn-default" value="提交"></td>
        </tr>
      </table>
    </form>
	</div>
<!--表单验证Start-->
<script>
    $(function () {
        $('form').validate({
            g_name: {
                rule: {
                    required: true
                },
                error: {
                    required: '货物名称不能为空'
                },
                success: '验证通过',
                message: '请输入货物名称'
            },
        })
    })
</script>
<!--表单验证End-->
    </body>
</html>